package info.greet.casel;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author Casel
 * Servlet implementation class SignUp
 */
@WebServlet("/SignUp")
public class SignUp extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public SignUp() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		
		PrintWriter output = response.getWriter();
		String login = request.getParameter("login");
		String password = request.getParameter("password");
		String desciption = request.getParameter("desciption");
		String country = request.getParameter("country");
		String Sex = request.getParameter("Sex");
		String artifacts[] = request.getParameterValues("artifacts");
		String weapons[] = request.getParameterValues("weapons");

		output.write("Your login is: " + login);;
		output.write("<br /> Your password is : " + password);
		output.write("<br />Your desciption is: " + desciption);;
		output.write("<br />Your country is: " + country);;
		output.write("<br />Your Sex is: " + Sex);;
		
		
		
		
		for (int i = 0; i<weapons.length; i++)
			{
			output.write("<br />Is dangeorus go alone take that: " + weapons[i]);;
			}
		
		for (int i = 0; i<artifacts.length; i++) {
			output.write("<br />Inventory: " + artifacts[i]);;
		}
	
		
		
	}

}
